package cn.itsource.exception;


import cn.itsource.constants.ErrorCode;
import lombok.Data;

@Data
// 全局异常
public class GlobalException extends RuntimeException {

    private ErrorCode code;

    public GlobalException(String message) {
        super(message);
    }

    public GlobalException(ErrorCode code) {

        super(code.getMessage());
        this.code = code;
    }


}
